/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bookinformationsearcher;

import com.google.api.services.books.model.Volume;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

/**
 * This interface defines methods for searching basic book information as well as its reviews and availability in local libraries
 *
 * @author Siliarus
 */
public interface BookInformationSearcher {

    /**
     * A method which invokes a book search based on its ISBN. Returns either the Volume found or null if any problem appears.
     *
     * @param query ISBN of book we want to search
     * @return null if any problem appears, Volume otherwise
     */
    public Volume searchForBook(String query);

    /**
     * Searches for book's author and returns it as a String
     *
     * @param book The book whose author we seek
     * @return the String representation of author or an "Unknown author" if none was found
     */
    public ArrayList<String> bookAuthors(Volume book);

    /**
     * Searches for book's rating and returns it as Double
     *
     * @param book the book whose rating we search
     * @return the rating value as Double or null if there is no rating yet
     */
    public Double bookRating(Volume book);

    /**
     * Searcher for book's information and returns it as a String, "No information found" is returned if nothing was found
     *
     * @param book the book we wish to know more about
     * @return either a String description of the book or "No information found"
     */
    public String bookDescription(Volume book);

    /**
     * Returns book's title as a String
     *
     * @param book the book we wish to know more about
     * @return book's title or "No title found" if there is no title
     */
    public String bookTitle(Volume book);

    /**
     * Returns a book review URL or null
     *
     * @param book the book we want to find out information about
     * @return URL of a review or null in case of wrong book
     */
    public URL reviewURL(Volume book);

    /**
     * Returns reviews from given URL
     *
     * @param url URL where reviews are placed
     * @return reviews of book
     */
    public ArrayList<String> getReviews(URL url);
}
